﻿// ------------------------------------------------------------------------------------------------
//  <copyright file="DoubleSortedList.cs" company="Iveely">
//    Copyright (c) Iveely Liu.  All rights reserved.
//  </copyright>
//  
//  <Create Time>
//    03/02/2013 21:59 
//  </Create Time>
//  
//  <contact owner>
//    liufanping@iveely.com 
//  </contact owner>
//  -----------------------------------------------------------------------------------------------

#region

using System.Collections.Generic;

#endregion

namespace IveelySE.NLP.Common.DataStructure.List
{
    /// <summary>
    ///   双精度型有序列表
    /// </summary>
    public class DoubleSortedList : SortedList<double, double>
    {
        #region 内部类

        private new class Comparer : IComparer<double>
        {
            #region IComparer<double> Members

            public int Compare(double x, double y)
            {
                if(x > y)
                {
                    return -1;
                }
                else
                {
                    return 1;
                }
            }

            #endregion
        }

        #endregion

        #region 公有方法

        public DoubleSortedList()
            : base(new Comparer())
        {
        }

        #endregion
    }
}